package com.kkb.service.impl;

import com.kkb.bean.Student;
import com.kkb.dao.StudentDao;
import com.kkb.dao.impl.StudentDaoImpl;
import com.kkb.pojo.Page;
import com.kkb.service.StudentService;

import java.util.List;

/**
 * 学生service实现
 */
public class StudentServiceImpl implements StudentService {
    private StudentDao dao = new StudentDaoImpl();

    @Override
    public List<Student> getAll(Student student, Page page) {
        return dao.getAll(student, page);
    }

    @Override
    public int count(Student student) {
        return dao.count(student);
    }

    @Override
    public Student getById(Integer id) {
        return dao.getById(id);
    }

    @Override
    public int insert(Student stu) {
        return dao.insert(stu);
    }

    @Override
    public int update(Student stu) {
        return dao.update(stu);
    }

    @Override
    public int delete(Integer id) {
        return dao.delete(id);
    }

    @Override
    public boolean checkNumber(String number, Integer id) {
        return dao.checkNumber(number,id);
    }
}
